package com.lin.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.time.LocalDateTime;

import java.io.Serializable;
import java.util.List;

import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.ibatis.type.ArrayTypeHandler;

/**
 * <p>
 *
 * </p>
 *
 * @author 林伟鸿
 * @since 2022-04-16
 */
@Data
@TableName(autoResultMap = true)
public class Course implements Serializable {

    private static final long serialVersionUID = 1L;


    @TableId(value = "course_id", type = IdType.AUTO)
    private Integer courseId;

    private String courseName;

    @TableField(typeHandler= FastjsonTypeHandler.class)
    private List<String> courseTag;

//    @TableField(exist = false)
//    public List<String> courseTagList;

    private Integer courseVip;

    private String teacher;

    /**
     * 课程视频链接
     */
    private String videoLink;

    /**
     * 课程封面链接
     */
    private String coverLink;

    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDateTime createTime;


}
